import React from 'react';
import { View, Text } from '@tarojs/components';
import { MaterialIcons } from 'taro-icons';

import './processStatus.scss';


interface processStatusProps {
    title: string;
    createTime: string;
}


/**
 * 顶部导航栏组件
 * @param {processStatusProps} props - 组件属性
 * @returns {JSX.Element} 渲染的顶部导航栏组件
 */
export const ProcessStatus: React.FC<processStatusProps> = ({ 
    title, createTime
}) => {
    if (!title) {
        return <></>
    }

    return (
        <View className="status-card">
            <View className="status-header">
                <View className="status-icon">
                    <MaterialIcons className="success-icon" name="check_circle" size={24} />
                </View>
                <Text className="status-title">{title}</Text>
                <Text className="status-time">完成于：{createTime}</Text>
            </View>
        </View>
    );
};

export default ProcessStatus;